package com.qf.user.controller;

import com.qf.user.entity.User;
import com.qf.user.service.UserService;
import com.qf.vo.PageDataVo;
import com.qf.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/list")
    public ResultVo list(User user,Integer current,Integer size){

        System.out.println(user);
        System.out.println(current);
        System.out.println(size);

        // 调用service进行业务处理
        PageDataVo data =  userService.list(user,current,size);

        return new ResultVo(200,"ok",data);

    }


}
